package com.zengjianjun.hadoop.demo.config.props;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.io.File;

/**
 * @author zengjianjun
 */
@Data
@Component
@ConfigurationProperties("hadoop")
public class HadoopProperties {

    /**
     * hadoop节点
     */
    private String nameNode;
    /**
     * 文件上传目录
     */
    private String directoryPath;
    /**
     * 操作用户
     */
    private String user;
    /**
     * 文件输出目录
     */
    private String outputPath;

    public String getFullFilePath(String fileName) {
        return directoryPath + File.separator + fileName;
    }

    public String getFullOutputPath(String jobName) {
        return outputPath + File.separator + jobName;
    }
}
